<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript">
function selectPc(){
			var node = $('#spcTree').tree('getSelected');
			$("#proClassName").val(node.text);
			$("#pro\\.proClass\\.id").val(node.id);
			$('#pcDlg').dialog('close');
		}
function openSelectPC(){
			$('#spcTree').tree({
				animate: true,
				url: '<%=request.getContextPath()%>/product/getAllPoductClassJson.action',
				onBeforeExpand:function(node){
					$('#spcTree').tree("options").url="<%=request.getContextPath()%>/product/getAllPoductClassJson.action?pc.id=" + node.id;
				},
				onClick:function(node){
					$('#spcTree').tree('expand',node.target);
				},
				onContextMenu: function(e, node){
					e.preventDefault();
					$('#spcTree').tree('select', node.target);
					$('#mm').menu('show', {
						left: e.pageX,
						top: e.pageY
					});
				}
			});
	   		var title = "商品分类选择";
	   		$('#pcDlg').dialog('open').dialog('setTitle',title);  
  }
</script>
<div id="pcDlg" class="easyui-dialog" style="width:400px;height:380px"  
        closed="true" buttons="#pc-dlg-buttons"> 
        <div class="easyui-layout" fit="true" style="background:#ccc;">
			<div region="center" style="overflow:auto;">
				<ul id="spcTree"></ul>
			</div> 
		</div>
		<div id="pc-dlg-buttons">  
		    <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="selectPc()">选择</a>  
		    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#pcDlg').dialog('close')">关闭</a>  
</div> 